package com.kexio.enterprise.integration.event.statistics;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * 事件统计信息
 * 
 * @author Kexio
 * @since 1.0.0
 */
public class EventStatistics {
    private String eventType;
    private long totalEvents;
    private long successfulEvents;
    private long failedEvents;
    private double successRate;
    private long averageProcessingTime;
    private long maxProcessingTime;
    private long minProcessingTime;
    private long totalListeners;
    private long activeListeners;
    private LocalDateTime lastEventTime;
    private LocalDateTime startTime;
    private Map<String, Long> hourlyStats; // 小时统计
    private Map<String, Long> topicStats; // 主题统计

    // Getters and Setters
    public String getEventType() { return eventType; }
    public void setEventType(String eventType) { this.eventType = eventType; }
    
    public long getTotalEvents() { return totalEvents; }
    public void setTotalEvents(long totalEvents) { this.totalEvents = totalEvents; }
    
    public long getSuccessfulEvents() { return successfulEvents; }
    public void setSuccessfulEvents(long successfulEvents) { this.successfulEvents = successfulEvents; }
    
    public long getFailedEvents() { return failedEvents; }
    public void setFailedEvents(long failedEvents) { this.failedEvents = failedEvents; }
    
    public double getSuccessRate() { return successRate; }
    public void setSuccessRate(double successRate) { this.successRate = successRate; }
    
    public long getAverageProcessingTime() { return averageProcessingTime; }
    public void setAverageProcessingTime(long averageProcessingTime) { this.averageProcessingTime = averageProcessingTime; }
    
    public long getMaxProcessingTime() { return maxProcessingTime; }
    public void setMaxProcessingTime(long maxProcessingTime) { this.maxProcessingTime = maxProcessingTime; }
    
    public long getMinProcessingTime() { return minProcessingTime; }
    public void setMinProcessingTime(long minProcessingTime) { this.minProcessingTime = minProcessingTime; }
    
    public long getTotalListeners() { return totalListeners; }
    public void setTotalListeners(long totalListeners) { this.totalListeners = totalListeners; }
    
    public long getActiveListeners() { return activeListeners; }
    public void setActiveListeners(long activeListeners) { this.activeListeners = activeListeners; }
    
    public LocalDateTime getLastEventTime() { return lastEventTime; }
    public void setLastEventTime(LocalDateTime lastEventTime) { this.lastEventTime = lastEventTime; }
    
    public LocalDateTime getStartTime() { return startTime; }
    public void setStartTime(LocalDateTime startTime) { this.startTime = startTime; }
    
    public Map<String, Long> getHourlyStats() { return hourlyStats; }
    public void setHourlyStats(Map<String, Long> hourlyStats) { this.hourlyStats = hourlyStats; }
    
    public Map<String, Long> getTopicStats() { return topicStats; }
    public void setTopicStats(Map<String, Long> topicStats) { this.topicStats = topicStats; }
}
